module dogre.renderwindow;

import dogre.viewport;
import dogre.camera;
import dogre.internals.utils;
import std.string;

extern(C)
{
    void* call_addViewport(void* ptrToWrapper, void* cam, int ZOrder, float left, float top, float width, float height);
	bool call_isClosed(void* ptr);
    void call_getCustomAttribute(void* ptrToWrapper, const(char)* name, void* pData);
}

class RenderWindow
{
    mixin(Wrapper);
    ~this(){}

    Viewport addViewport(Camera cam, int ZOrder=0, float left=0.0f, float top=0.0f, float width=1.0f, float height=1.0f)
    {
        return new Viewport(call_addViewport(p, cam.p, ZOrder, left, top, width, height));
    }
	
	bool isClosed()
	{
		return call_isClosed(p);
	}
    
    void getCustomAttribute(string name, void* pData)
    {
        call_getCustomAttribute(p, toStringz(name), pData);
    }
}
